//
//  ListOneCell.m
//  SweetComics
//
//  Created by LeeZhe on 15/1/29.
//  Copyright (c) 2015年 LeeZhe. All rights reserved.
//

#import "ListOneCell.h"

@implementation ListOneCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.buttonOne = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonTwo = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonThree = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonFour = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:_buttonOne];
        [self.contentView addSubview:_buttonTwo];
        [self.contentView addSubview:_buttonThree];
        [self.contentView addSubview:_buttonFour];
    }
    return self;
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _buttonOne.frame = CGRectMake(0, 0, self.contentView.frame.size.width / 2 - 10, self.contentView.frame.size.height / 2 -10);

    _buttonTwo.frame = CGRectMake(self.contentView.frame.size.width / 2,0, self.contentView.frame.size.width / 2,self.contentView.frame.size.height / 2- 10);
    _buttonThree.frame = CGRectMake(0,100,self.contentView.frame.size.width / 2 - 10,self.contentView.frame.size.height / 2 - 10);
    _buttonFour.frame = CGRectMake(self.frame.size.width / 2, self.contentView.frame.size.height / 2,self.frame.size.width / 2 , self.contentView.frame.size.height / 2 - 10);
}

- (void)setPicture
{
    _buttonOne.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"one.jpg"]];
    _buttonTwo.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"two.jpg"]];
    _buttonThree.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"three.jpg"]];
    _buttonFour.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"four.jpg"]];
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)dealloc
{
    [_buttonOne release];
    [_buttonTwo release];
    [_buttonThree release];
    [_buttonFour release];
    [super dealloc];
}

@end
